import request from "@/utils/request"

// 上传-保存
export function parseShp(data) {
  return request({
    url: `/modules/spaceSh/parseShp`,
    method: "post",
    data
  })
}
// 上传-确定
export function updateAll(type, data) {
  return request({
    url: `/modules/${type}/updateAll`,
    method: "post",
    data
  })
} 
// 查询-表格表头
export function getField(type) {
  return request({
    url: `/modules/${type}/getField`,
    method: "get"
  })
}
// 查询-表格数据
export function getAll(type, params) {
  return request({
    url: `/modules/${type}/getAll`,
    method: "get",
    params
  })
}
// 查询-保存列设置
export function fieldOption(type, data) {
  return request({
    url: `/modules/${type}/fieldOption`,
    method: "post",
    data
  })
}
// 查询-删除
export function deleteList(type, ids) {
  return request({
    url: `/modules/${type}/delete/${ids}`,
    method: "post"
  })
}

export function getById(type, id) {
  return request({
    url: `/modules/${type}/getById/${id}`,
    method: "get"
  })
}

export function update(type, data) {
  return request({
    url: `/modules/${type}/update`,
    method: "post",
    data
  })
}

export function exist(type, params) {
  return request({
    url: `/modules/${type}/exist`,
    method: "get",
    params
  })
}

// 提交质检
export function submit(type, data) {
  return request({
    url: `/modules/${type}/submit/${data}`,
    method: "post"
  })
}